package com.gitee.wsl.config.pref


import com.gitee.wsl.data.store.StoreServer
import kotlin.reflect.KProperty

internal class FloatPref(
    val default: Float,
    override val key: String?,
    private val commitByDefault: Boolean
) : AbstractPref<Float>() {
    override fun getFromPreference(property: KProperty<*>, preference: StoreServer): Float {
        return preference.getPreferenceOrDefault(preferenceKey, default)
    }

    override fun setToPreference(property: KProperty<*>, value: Float, preference: StoreServer) {
        preference.putPreference(preferenceKey,value)
    }

}